package routers

import "github.com/gin-gonic/gin"

// RegisterRoleRoutes 注册角色管理路由
func (pr *ProtectedRoutes) RegisterRoleRoutes(protected *gin.RouterGroup) {
	// 角色管理
	roles := protected.Group("/role")
	{
		roles.GET("", pr.roleController.GetRoleList)
		roles.GET("/:id", pr.roleController.GetRoleByID)
		roles.POST("", pr.roleController.CreateRole)
		roles.PUT("/:id", pr.roleController.UpdateRole)
		roles.DELETE("/:id", pr.roleController.DeleteRole)
		roles.POST("/:id/permissions", pr.roleController.AssignPermissions)
	}
}
